#include "SymboleVal.hpp"

SymboleVal::SymboleVal():SymboleAff("SymboleVal")
{
}

SymboleVal::SymboleVal(string category):SymboleAff(category)
{
}


SymboleVal::SymboleVal(double val):SymboleAff("SymboleVal")
{
	this->val = val;
	this->affected = true;
}

double SymboleVal::getValue() const {
	return this->val;
}

void SymboleVal::print(ostream& os) const{
  	os << this->val << " (" << this->type << ")";
}

string SymboleVal::toString() const{
  	stringstream oss;
  	if(this->type != NULL) {
  	  	oss << this->val << " (" << this->type->getName() << ")";
  	} else {
  		oss << this->val << " (" << this->type << ")";
  	}
  	return  oss.str();
}

